import React,{useState,useEffect} from 'react'
import { getHomeDetailOrder } from '@/api/request'
import HomeDetailBanners from '@/components/HomeDetailBanners'
import SaleDetail from '@/components/SaleDetail'

export default function HomeOrder() {
  const [banners,setBanners] = useState([]);
  const [detail,setDetail] = useState([]);
  useEffect(()=>{
    (async()=> {
      let { data } = await getHomeDetailOrder();
      console.log(data);
      setBanners(data)
      setDetail(data);
    })()
  },[])
  return (
    <>
      <HomeDetailBanners banners={banners}/>
      <SaleDetail detail={detail}/>
    </>
  )
} 
